package ca.michaelmaguire.server.mobiledownload.server.entity;

import java.io.Serializable;
import java.util.Date;

import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@SuppressWarnings("serial")
@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class UserAgent implements Serializable
{
	@PrimaryKey
	@Persistent
	private String	useragent;

	@Persistent
	private long	visitcount;

	@Persistent
	private Date	created;

	public String getUserAgent()
	{
		return useragent;
	}

	public void setUserAgent(String useragent)
	{
		this.useragent = useragent.trim();
	}

	public void setVisitCount(long visitcount)
	{
		this.visitcount = visitcount;
	}

	public long getVisitCount()
	{
		return visitcount;
	}

	public Date getCreated()
	{
		return created;
	}

	public void setCreated(Date created)
	{
		this.created = created;
	}

	// public Long getId()
	// {
	// return this.useragent.getId();
	// }

	public String toString()
	{
		return getUserAgent();
	}
}
